home *** CD-ROM | disk | FTP | other *** search
/ SGI Hot Mix 17 / Hot Mix 17.iso / HM17_SGI / research / lib / ncdf_exists.pro < prev    next >
Text File  |  1997-07-08  |  1KB  |  59 lines

  1. ; $Id: ncdf_exists.pro,v 1.3 1997/02/22 02:33:32 ali Exp $
  2. ;
  3. ; Copyright (c) 1992-1997, Research Systems, Inc.  All rights reserved.
  4. ;    Unauthorized reproduction prohibited.
  5. ;
  6. ;+
  7. ; NAME:
  8. ;    NCDF_EXISTS
  9. ;
  10. ; PURPOSE:
  11. ;    Test for the existence of the NetCDF library
  12. ;
  13. ; CATEGORY:
  14. ;    File Formats
  15. ;
  16. ; CALLING SEQUENCE:
  17. ;    Result = NCDF_EXISTS()
  18. ;
  19. ; INPUTS:
  20. ;    None.
  21. ;
  22. ; KEYWORD PARAMETERS:
  23. ;    None.
  24. ;
  25. ; OUTPUTS:
  26. ;    Returns TRUE (1) if the NetCDF data format library is supported
  27. ;    Returns FALSE(0) if it is not.
  28. ;
  29. ; COMMON BLOCKS:
  30. ;    NCDFTEST
  31. ;
  32. ; EXAMPLE:
  33. ;    IF ncdf_exists() EQ 0 THEN Fail,"Library not supported on this machine"
  34. ;
  35. ; MODIFICATION HISTORY
  36. ;    Written by:    Joshua Goldstein,  12/8/92
  37. ;
  38. ;-
  39.  
  40. PRO    ncdf_control, cid, VERBOSE=v
  41.     common    ncdftest, has_ncdf
  42.     has_ncdf    = 0
  43. end
  44.  
  45. FUNCTION ncdf_exists
  46.     common    ncdftest, has_ncdf
  47.  
  48.     ; CDF is not available in the IDL Student Edition
  49.     ;
  50.     ; NOTE: The LMGR function is undocumented, considered private
  51.     ; to RSI, and is subject to change or removal from IDL at any
  52.     ; time without notice.
  53.     if (LMGR(/STUDENT) eq 1) then return, 0
  54.  
  55.     has_ncdf    = 1
  56.     ncdf_control,0,/verbose
  57.     return, has_ncdf
  58. END
  59.